<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>地图展示</title>
  <style>
    body, html, #allmap {
      width: 100%;
      height: 100%;
      overflow: hidden;
      margin: 0;
      font-family: "微软雅黑";
    }
  </style>
  <script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=G1LFyjrNGIkns5OfpZnrCGAKxpycPLwb"></script>
</head>
<body>
  <div id="allmap"></div>
</body>
</html>
<script type="text/javascript">
  // GL 版命名空间为BMapGL
  // 按住鼠标右键，修改倾斜角和角度
  let map = new BMapGL.Map("allmap"); // 创建map实例
  let point = new BMapGL.Point(116.404, 39.915);

  map.centerAndZoom(point, 12); // 初始化地图，设置中心点坐标和地图级别
  map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
  map.setMapStyleV2({
    styleId: 'dd342138fd9d673276c2b017ec234684'
  });
</script>